import { BaseWindow } from "../../../../component/window/BaseWindow";
import { ILayer } from "../../../../mvc/interfaces/ILayer";
import { Language } from "../../../../../extend/language/Language";
import { DataProvider } from "../../../../../fl/data/DataProvider";
import { ObjCreate } from "../../common/ObjCreate";
import { ScrollPolicy } from "../../../../../fl/controls/ScrollPolicy";
import { AchievementFinishedCellRender } from "../item/AchievementFinishedCellRender";
import { GTileList } from "../../../../../com/mui/controls/GTileList";
//class AchievementFinishedHistoryWin
    
    export  class AchievementFinishedHistoryWin extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            this.setSize(594, 430);
            this.title = Language.getString(80110);
            this.titleHeight = 27;
            this.initView();
            return;
        }

        public updateList(arg1: Array<any>): void
        {
            var loc1=new DataProvider();
            var loc2=0;
            while (loc2 < arg1.length) 
            {
                loc1.addItem(arg1[loc2]);
                ++loc2;
            }
            this._list.dataProvider = loc1;
            return;
        }

        /* internal  */initView(): void
        {
            var loc1=null;
            ObjCreate.createBg(18, 39, 559, 381, this);
            loc1 = ObjCreate.createGTextField("", 42, 47, 220, 20, this);
            loc1.htmlText = Language.getString(80111);
            loc1 = ObjCreate.createGTextField("", 191, 47, 220, 20, this);
            loc1.htmlText = Language.getString(80112);
            loc1 = ObjCreate.createGTextField("", 366, 47, 220, 20, this);
            loc1.htmlText = Language.getString(80113);
            loc1 = ObjCreate.createGTextField("", 490, 47, 220, 20, this);
            loc1.htmlText = Language.getString(80115);
            this._list = ObjCreate.createTileList(18, 68, 556, 343, this);
            this._list.columnWidth = 546;
            this._list.rowHeight = 58;
            this._list.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._list.verticalScrollPolicy = ScrollPolicy.AUTO;
            this._list.setStyle("cellRenderer", AchievementFinishedCellRender);
            return;
        }

        /* internal */ /* var */_list: GTileList;
    }
